<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="tephone=no,email=no,date=no,address=no">
		<link rel="stylesheet" type="text/css" href="../css/aui.css" />
		<style type="text/css">
			#divcomment {
				padding-bottom: 2rem;
			}
			#btnsend {
				position: relative;
				display: inline-block;
				font-size: 0.7 rem;
				text-align: center;
				margin: 0;
				padding: 0 0.6 rem;
				height: 1.3 rem;
				color: #ffffff !important;
				background-color: #ffb300 !important;
				line-height: 1.3 rem;
				border-radius: 0.2 rem;
				white-space: nowrap;
				text-overflow: ellipsis;
				vertical-align: middle;
				-webkit-box-sizing: border-box;
				box-sizing: border-box;
				-webkit-user-select: none;
				user-select: none;
			}
			.activebtn {
				background: #ffc107;
			}
		</style>
	</head>
	<body>
		<div id="content">
			<section id="secarticle" class="aui-content-padded" style="margin-bottom: 2rem;" v-show="show">
				<h2>{{record.title}}</h2>
				<div class="aui-card-list-user-name">
					<h6>{{record.author}} {{record.addTimeDesc}}<h6><h6>浏览量： {{record.viewQty}}</h6>
				</div>
				<div class="aui-content" >
					{{{record.content}}}
				</div>
			</section>
			<footer class="aui-bar aui-bar-tab">
				<div class="aui-bar-tab-item aui-padded-l-15 aui-padded-r-15" tapmode>
					<div class="aui-searchbar-input aui-border-radius" style="background:#dddddd;">
						<i class="aui-iconfont aui-icon-pencil"></i>
						<input type="text" placeholder="请点评...">
					</div>
				</div>
				<!--<div class="aui-bar-tab-item" tapmode>
					<div class="aui-margin-l-15" id="btnsend" onclick="submitComment();">
						发表
					</div>
				</div>-->
			</footer>
		</div>
	</body>
	<script type="text/javascript" src="../script/api.js" ></script>
	<script type="text/javascript" src="../script/vue.min.js" ></script>
	<script type="text/javascript" src="../script/aui-toast.js" ></script>
	<script type="text/javascript">
		/*
		 var toast = new auiToast({
		 });
		 toast.loading({
		 title:"加载中",
		 duration:2000
		 });*/
		var vm;
		apiready = function() {
			api.showProgress({
				title : '努力加载中...',
			});
			vm = new Vue({
				el : '#content',
				data : {
					record : {},
					show:false
				},
				ready : function() {
					$api.get('http://mu.biachina.com/api/article/' + api.pageParam.id, function(ret) {
						setTimeout(function() {
							vm.record = ret;
							vm.show = true;
							api.hideProgress();
						}, 1000);
					}, 'json');
				}
			});
		}
		function submitComment() {
			if ($api.getStorage('mu_user') == null) {
				var delay = 0;
				if (api.systemType != 'ios') {
					delay = 300;
				}
				api.openWin({
					name : 'login',
					url : 'login.html',
					bounces : false,
					delay : delay,
					slidBackEnabled : true,
					vScrollBarEnabled : false
				});
			}
		}
	</script>
</html>